package com.java.main.service.work.impl;

import com.java.main.domain.user.UserDO;
import com.java.main.domain.work.WorkDO;
import com.java.main.service.SysBaseServiceImpl;
import com.java.main.service.work.WorkService;
import com.java.main.util.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Service
public class WorkServiceImpl extends SysBaseServiceImpl<WorkDO, Integer> implements WorkService {
    @PersistenceContext
    EntityManager entityManager;

    @Override
    @Transactional
    public void saveWork(WorkDO workDO) {

        entityManager.persist(workDO);
        entityManager.flush();
    }
}
